<?php
require_once('../class/config.php');

$networkOwnerId = 'T2NO2';
$date = '2011-01-01 00:00:00';
$hour = '2011-01-01 10:00:00';
$hourlyLoad = '100.0';

$loadProfile = new Client_RK1_receiveLoadProfile($networkOwnerId, $date, $hour, $hourlyLoad);

$networkOwnerId = SERVICE_NO_ID;
$constraintAreaId = '12';
$startDate = date('Y-m-d H:i:s');
$endDate = date('Y-m-d H:i:s');
$electricityUserId = 'User';
$consumedEnergy = '123.12';
$electricitySupplierId = 'T2ES1';
$suppliedEnergy = 231.12;

$meteredData = new Client_RK1_receiveDailyMeteredData($networkOwnerId, $constraintAreaId, $startDate, $endDate, $electricityUserId, $consumedEnergy, $electricitySupplierId, $suppliedEnergy);

$networkOwnerId = SERVICE_NO_ID;
$electricitySupplierId = 'T2ES1';
$balanceProviderId = null;
$profileSettlementAreaId = '12';
$calculationStage = 'final';
$supplyMonth = date('Y-m-d H:i:s');
$highLoadProfileShare = 123.45;
$lowLoadProfileShare = 54.321;
$loadProfileShare = new Client_RK1_receiveLoadProfileShare($networkOwnerId, $electricitySupplierId, $balanceProviderId, $profileSettlementAreaId, $calculationStage, $supplyMonth, $highLoadProfileShare, $lowLoadProfileShare);

/*
//$soapClient = new Client_RK1_RuritaniaKradoService();

//var_dump($soapClient->__getFunctions());

try {
    //print_r($soapClient->receiveLoadProfile($loadProfile));
    print_r($soapClient->receiveDailyMeteredData($meteredData));
} catch (SoapFault $exception) {
    print_r($exception);
}
*/

$client = new Client_RK1();
/*
echo $client->sendMeterReading($meteredData) ? 'OK' : 'NOT';
print_r($client->result);
*/
/*
echo $client->sendLoadProfile($loadProfile) ? 'OK' : 'NOT';
print_r($client->result);
*/
echo $client->sendLoadProfileShare($loadProfileShare) ? 'OK' : 'NOT';
print_r($client->result);
